/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rie06.rmi;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.PathParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;

/**
 * REST Web Service
 *
 * @author clement
 */
@Path("user")
public class WS_GenericResource {

    @Context
    private UriInfo context;

    /**
     * Creates a new instance of WS_GenericResource
     */
    public WS_GenericResource() {
    }

    /**
     * Retrieves representation of an instance of com.rie06.jaxrsws.WS_GenericResource
     * @return an instance of java.lang.String
     */
    @GET
    @Produces("application/xml")
    @Path("name/{name}")
    public String getXml(@PathParam("name") String name) {
        //TODO return proper representation object
        String message="<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>"
                + "<message>"
                + "Hello World - "+name
                + "</message>";
        return message;
    }

    /**
     * PUT method for updating or creating an instance of WS_GenericResource
     * @param content representation for the resource
     * @return an HTTP response with content of the updated or created resource.
     */
    @PUT
    @Consumes("application/xml")
    public void putXml(String content) {
    }
}
